package com.javakc.platform.modules.system.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.javakc.platform.modules.system.user.entity.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author zhouhonggang
 * @version 1.0.0
 * @project springboot-development-platform
 * @datetime 2022-04-13 10:37
 * @description: [系统管理·用户数据]
 */
public interface UserDao extends BaseMapper<User> {
    @Select("select distinct a.code from system_authority a,system_role_authority ra where a.id=ra.authority_id and ra.role_id in (select ur.role_id from system_user  u,system_user_role ur where u.id=ur.user_id and u.name=#{username})")
    public List<String> queryCodeByUsername(String username);


}

